:root {
    --primary-color: #31c27c;
    --primary-hover: #29a369;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --bg-light: #f2f2f2;
    --bg-lighter: #e6e6e6;
    --white: #fff;
    --border-color: #f0f0f0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 10px;
    --border-radius-sm: 3px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
}

/* 头部导航栏 */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo样式 */
.logo a {
    display: block;
    width: 170px;
    height: 46px;
    background-image: url(imgs/qqmusic.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    font-size: 0;
    transition: var(--transition);
}

.logo a:hover {
    opacity: 0.9;
}

/* 主导航菜单 */
.nav ul {
    display: flex;
    align-items: center;
}

.nav ul li {
    margin: 0 30px;
}

.nav ul li a {
    display: block;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    transition: var(--transition);
    position: relative;
}

.nav ul li a:hover {
    color: var(--primary-color);
}

.nav ul li.active a {
    color: var(--primary-color);
}

.nav ul li.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-sm);
}
/* 搜索框样式 */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 30px;
    padding: 0 20px;
    height: 40px;
    transition: var(--transition);
}

.search-box:hover {
    background-color: var(--bg-lighter);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-color);
    height: 100%;
    padding-right: 10px;
}

.search-box input::placeholder {
    color: var(--text-lighter);
}

.search-box button {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    transition: var(--transition);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* 用户操作区样式 */
.user-actions ul {
    display: flex;
    align-items: center;
}

.user-actions ul li {
    margin-left: 15px;
}

.login-btn, .register-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.login-btn {
    color: var(--text-color);
    background-color: var(--bg-color);
}

.login-btn:hover {
    color: var(--primary-color);
}

.register-btn {
    color: var(--white);
    background-color: var(--primary-color);
}

.register-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(49, 194, 124, 0.3);
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-color);
    background-color: var(--bg-light);
    transition: var(--transition);
}

.settings-btn:hover {
    background-color: var(--bg-lighter);
    color: var(--primary-color);
}

/*  内容区域 */
.content .banner {
    background-color: var(--white);
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.content .banner ul {
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: center;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: 40px;
}

.content .banner ul li {
    margin: 0;
}

.content .banner ul li a {
    color: var(--text-color);
    transition: var(--transition);
    padding: 0 10px;
    font-size: 16px;
}

.content .banner ul li.active a {
    color: var(--primary-color);
    font-weight: 500;
    border-bottom: 3px solid var(--primary-color);
}

.content .banner ul li a:hover {
    color: var(--primary-color);
}


/* 专辑列表 */
.album-container {
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 30px 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.album {
    width: 100%;
    text-align: center;
}

.cover-wrap {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 保持1:1比例 */
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cover-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: var(--transition);
}

.cover-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    opacity: 0;
    transition: var(--transition);
}

/* 鼠标悬停效果 */
.cover-wrap:hover .cover-img {
    transform: scale(1.1);
}

.cover-wrap:hover .cover-mask {
    background-color: rgba(0, 0, 0, 0.2);
}

.cover-wrap:hover .cover-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.cover-wrap:hover .cover-play:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.album-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 10px;
}

.album-author {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-lighter);
    margin-top: 5px;
}

.album-time {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 5px;
}

.nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

/* 换页 */
.page {
    padding: 30px 0;
    text-align: center;
}

.page-list {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    line-height: 40px;
}

.page-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    margin: 0 5px;
    transition: var(--transition);
    color: var(--text-color);
}

.page-item.active a {
    color: var(--white);
    background-color: var(--primary-color);
}

.page-item:hover a {
    color: var(--white);
    background-color: var(--primary-hover);
}

/* 页脚样式 */
.footer {
    background-color: var(--white);
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
}

.footer-link {
    color: var(--text-light);
    font-size: 14px;
    margin: 0 15px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    /* 小于等于1024px时的样式 */
    .content .banner ul {
        gap: 30px;
    }
    
    .header .container {
        padding: 0 15px;
    }
    
    .nav ul li {
        margin: 0 20px;
    }
    
    .search-container {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    /* 小于等于768px时的样式 */
    .header .container {
        padding: 0 10px;
    }
    
    .nav ul li {
        margin: 0 15px;
    }
    
    .search-container {
        margin: 0 15px;
    }
    
    .user-actions ul li {
        margin-left: 10px;
    }
    .nowrap {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .content .banner ul {
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-left, .footer-right {
        margin: 10px 0;
    }
    
    .footer-link {
        margin: 0 10px;
    }
}

@media (max-width: 640px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 10px;
    }
    
    .search-container {
        order: 4;
        width: 100%;
        margin: 15px 0 0 0;
    }
    
    .content .banner {
        height: auto;
        padding: 10px 0;
    }
    
    .content .banner ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .content .banner ul li {
        margin: 5px;
    }
    
    .album-container {
        grid-gap: 20px 15px;
    }
}

@media (max-width: 480px) {
    .nav ul li {
        margin: 0 10px;
    }
    
    .nav ul li a {
        font-size: 14px;
    }
    
    .login-btn, .register-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .album-container {
        padding: 20px 15px;
    }
}
:root {
    --primary-color: #31c27c;
    --primary-hover: #29a369;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --border-color: #f0f0f0;
}
